﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CG.Security;
using CG.Security.Principal;
using System.Data;
using DevExpress.XtraEditors;

namespace td.Core.Security
{
    public class UserInfo : DevExpress.XtraEditors.XtraForm
    {
        #region IDE 控件生成代码
        #region IDE生成的属性代码
        private DevExpress.XtraEditors.PanelControl panelControl1;
        private DevExpress.XtraLayout.LayoutControl layoutControl1;
        private DevExpress.XtraEditors.TextEdit tbCreateDate;
        private DevExpress.XtraEditors.TextEdit tbUserName;
        private DevExpress.XtraEditors.TextEdit tbLastLoginTime;
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
        private DevExpress.XtraTab.XtraTabControl xtraTabControl1;
        private DevExpress.XtraTab.XtraTabPage UserRole;
        private DevExpress.XtraEditors.PanelControl panelControl2;
        private DevExpress.XtraLayout.LayoutControl layoutControl2;
        private DevExpress.XtraEditors.LabelControl labelControl2;
        private DevExpress.XtraEditors.ListBoxControl m_listBoxUserRoles;
        private DevExpress.XtraEditors.ListBoxControl m_listBoxRoles;
        private DevExpress.XtraEditors.SimpleButton simpleButton2;
        private DevExpress.XtraEditors.SimpleButton simpleButton1;
        private DevExpress.XtraEditors.LabelControl labelControl1;
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
        private DevExpress.XtraTab.XtraTabPage UserRight;
        private DevExpress.XtraEditors.SimpleButton simpleButton5;
        private DevExpress.XtraEditors.SimpleButton simpleButton4;
        private DevExpress.XtraEditors.SimpleButton sbOk;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
        private DevExpress.XtraEditors.PanelControl panelControl3;
        private DevExpress.XtraLayout.LayoutControl layoutControl3;
        private DevExpress.XtraEditors.LabelControl labelControl3;
        private DevExpress.XtraEditors.ListBoxControl m_listBoxUserRights;
        private DevExpress.XtraEditors.ListBoxControl m_listBoxRights;
        private DevExpress.XtraEditors.SimpleButton simpleButton6;
        private DevExpress.XtraEditors.CheckEdit checkEdit1;
        private DevExpress.XtraEditors.SimpleButton simpleButton7;
        private DevExpress.XtraEditors.LabelControl labelrights;
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem19;
        private DevExpress.XtraLayout.LayoutControl layoutControl4;
        private DevExpress.XtraEditors.LabelControl labelControl4;
        private DevExpress.XtraEditors.ListBoxControl listBoxControl1;
        private DevExpress.XtraEditors.ListBoxControl listBoxControl3;
        private DevExpress.XtraEditors.SimpleButton simpleButton8;
        private DevExpress.XtraEditors.SimpleButton simpleButton9;
        private DevExpress.XtraEditors.LabelControl labelControl5;
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem20;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem21;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem22;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem23;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem24;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem25;
        private DevExpress.XtraEditors.PanelControl panelControl4;

        private void InitializeComponent()
        {
            this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            this.simpleButton5 = new DevExpress.XtraEditors.SimpleButton();
            this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton();
            this.sbOk = new DevExpress.XtraEditors.SimpleButton();
            this.tbCreateDate = new DevExpress.XtraEditors.TextEdit();
            this.tbUserName = new DevExpress.XtraEditors.TextEdit();
            this.tbLastLoginTime = new DevExpress.XtraEditors.TextEdit();
            this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.UserRole = new DevExpress.XtraTab.XtraTabPage();
            this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
            this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
            this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
            this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
            this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
            this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
            this.m_listBoxUserRoles = new DevExpress.XtraEditors.ListBoxControl();
            this.m_listBoxRoles = new DevExpress.XtraEditors.ListBoxControl();
            this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
            this.UserRight = new DevExpress.XtraTab.XtraTabPage();
            this.panelControl3 = new DevExpress.XtraEditors.PanelControl();
            this.layoutControl3 = new DevExpress.XtraLayout.LayoutControl();
            this.labelControl3 = new DevExpress.XtraEditors.LabelControl();
            this.m_listBoxUserRights = new DevExpress.XtraEditors.ListBoxControl();
            this.m_listBoxRights = new DevExpress.XtraEditors.ListBoxControl();
            this.simpleButton6 = new DevExpress.XtraEditors.SimpleButton();
            this.checkEdit1 = new DevExpress.XtraEditors.CheckEdit();
            this.simpleButton7 = new DevExpress.XtraEditors.SimpleButton();
            this.labelrights = new DevExpress.XtraEditors.LabelControl();
            this.layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup();
            this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControl4 = new DevExpress.XtraLayout.LayoutControl();
            this.labelControl4 = new DevExpress.XtraEditors.LabelControl();
            this.listBoxControl1 = new DevExpress.XtraEditors.ListBoxControl();
            this.listBoxControl3 = new DevExpress.XtraEditors.ListBoxControl();
            this.simpleButton8 = new DevExpress.XtraEditors.SimpleButton();
            this.simpleButton9 = new DevExpress.XtraEditors.SimpleButton();
            this.labelControl5 = new DevExpress.XtraEditors.LabelControl();
            this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup();
            this.layoutControlItem20 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem21 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem22 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem23 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem24 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem25 = new DevExpress.XtraLayout.LayoutControlItem();
            this.panelControl4 = new DevExpress.XtraEditors.PanelControl();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
            this.panelControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
            this.layoutControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbCreateDate.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbUserName.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbLastLoginTime.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.UserRole.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
            this.panelControl2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit();
            this.layoutControl2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.m_listBoxUserRoles)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.m_listBoxRoles)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
            this.UserRight.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl3)).BeginInit();
            this.panelControl3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).BeginInit();
            this.layoutControl3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.m_listBoxUserRights)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.m_listBoxRights)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.checkEdit1.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).BeginInit();
            this.layoutControl4.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.listBoxControl1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.listBoxControl3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem23)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem24)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem25)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl4)).BeginInit();
            this.panelControl4.SuspendLayout();
            this.SuspendLayout();
            // 
            // panelControl1
            // 
            this.panelControl1.Controls.Add(this.layoutControl1);
            this.panelControl1.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelControl1.Location = new System.Drawing.Point(0, 0);
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new System.Drawing.Size(673, 83);
            this.panelControl1.TabIndex = 1;
            // 
            // layoutControl1
            // 
            this.layoutControl1.Controls.Add(this.simpleButton5);
            this.layoutControl1.Controls.Add(this.simpleButton4);
            this.layoutControl1.Controls.Add(this.sbOk);
            this.layoutControl1.Controls.Add(this.tbCreateDate);
            this.layoutControl1.Controls.Add(this.tbUserName);
            this.layoutControl1.Controls.Add(this.tbLastLoginTime);
            this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.layoutControl1.Location = new System.Drawing.Point(2, 2);
            this.layoutControl1.Name = "layoutControl1";
            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(645, 276, 250, 350);
            this.layoutControl1.Root = this.layoutControlGroup1;
            this.layoutControl1.Size = new System.Drawing.Size(669, 79);
            this.layoutControl1.TabIndex = 1;
            this.layoutControl1.Text = "layoutControl1";
            // 
            // simpleButton5
            // 
            this.simpleButton5.Location = new System.Drawing.Point(282, 37);
            this.simpleButton5.Name = "simpleButton5";
            this.simpleButton5.Size = new System.Drawing.Size(135, 22);
            this.simpleButton5.StyleController = this.layoutControl1;
            this.simpleButton5.TabIndex = 10;
            this.simpleButton5.Text = "更改密码";
            this.simpleButton5.Click += new System.EventHandler(this.simpleButton5_Click);
            // 
            // simpleButton4
            // 
            this.simpleButton4.Location = new System.Drawing.Point(421, 37);
            this.simpleButton4.Name = "simpleButton4";
            this.simpleButton4.Size = new System.Drawing.Size(116, 22);
            this.simpleButton4.StyleController = this.layoutControl1;
            this.simpleButton4.TabIndex = 9;
            this.simpleButton4.Text = "查看用户权限";
            this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click);
            // 
            // sbOk
            // 
            this.sbOk.Location = new System.Drawing.Point(541, 37);
            this.sbOk.Name = "sbOk";
            this.sbOk.Size = new System.Drawing.Size(116, 22);
            this.sbOk.StyleController = this.layoutControl1;
            this.sbOk.TabIndex = 8;
            this.sbOk.Text = "确定";
            // 
            // tbCreateDate
            // 
            this.tbCreateDate.Location = new System.Drawing.Point(371, 12);
            this.tbCreateDate.Name = "tbCreateDate";
            this.tbCreateDate.Size = new System.Drawing.Size(286, 21);
            this.tbCreateDate.StyleController = this.layoutControl1;
            this.tbCreateDate.TabIndex = 5;
            // 
            // tbUserName
            // 
            this.tbUserName.Location = new System.Drawing.Point(100, 12);
            this.tbUserName.Name = "tbUserName";
            this.tbUserName.Size = new System.Drawing.Size(179, 21);
            this.tbUserName.StyleController = this.layoutControl1;
            this.tbUserName.TabIndex = 4;
            // 
            // tbLastLoginTime
            // 
            this.tbLastLoginTime.Location = new System.Drawing.Point(100, 37);
            this.tbLastLoginTime.Name = "tbLastLoginTime";
            this.tbLastLoginTime.Size = new System.Drawing.Size(178, 21);
            this.tbLastLoginTime.StyleController = this.layoutControl1;
            this.tbLastLoginTime.TabIndex = 7;
            // 
            // layoutControlGroup1
            // 
            this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
            this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
            this.layoutControlItem1,
            this.layoutControlItem2,
            this.layoutControlItem4,
            this.layoutControlItem3,
            this.layoutControlItem9,
            this.layoutControlItem10});
            this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
            this.layoutControlGroup1.Name = "layoutControlGroup1";
            this.layoutControlGroup1.Size = new System.Drawing.Size(669, 79);
            this.layoutControlGroup1.Text = "layoutControlGroup1";
            this.layoutControlGroup1.TextVisible = false;
            // 
            // layoutControlItem1
            // 
            this.layoutControlItem1.Control = this.tbUserName;
            this.layoutControlItem1.CustomizationFormText = "用户名：";
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
            this.layoutControlItem1.Name = "layoutControlItem1";
            this.layoutControlItem1.Size = new System.Drawing.Size(271, 25);
            this.layoutControlItem1.Text = "用户名：";
            this.layoutControlItem1.TextSize = new System.Drawing.Size(84, 14);
            // 
            // layoutControlItem2
            // 
            this.layoutControlItem2.Control = this.tbCreateDate;
            this.layoutControlItem2.CustomizationFormText = "创建时间";
            this.layoutControlItem2.Location = new System.Drawing.Point(271, 0);
            this.layoutControlItem2.Name = "layoutControlItem2";
            this.layoutControlItem2.Size = new System.Drawing.Size(378, 25);
            this.layoutControlItem2.Text = "创建时间";
            this.layoutControlItem2.TextSize = new System.Drawing.Size(84, 14);
            // 
            // layoutControlItem4
            // 
            this.layoutControlItem4.Control = this.tbLastLoginTime;
            this.layoutControlItem4.CustomizationFormText = "最后登录时间：";
            this.layoutControlItem4.FillControlToClientArea = false;
            this.layoutControlItem4.Location = new System.Drawing.Point(0, 25);
            this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 25);
            this.layoutControlItem4.MinSize = new System.Drawing.Size(142, 25);
            this.layoutControlItem4.Name = "layoutControlItem4";
            this.layoutControlItem4.Size = new System.Drawing.Size(270, 34);
            this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            this.layoutControlItem4.Text = "最后登录时间：";
            this.layoutControlItem4.TextSize = new System.Drawing.Size(84, 14);
            // 
            // layoutControlItem3
            // 
            this.layoutControlItem3.Control = this.sbOk;
            this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
            this.layoutControlItem3.FillControlToClientArea = false;
            this.layoutControlItem3.Location = new System.Drawing.Point(529, 25);
            this.layoutControlItem3.MaxSize = new System.Drawing.Size(120, 26);
            this.layoutControlItem3.MinSize = new System.Drawing.Size(39, 26);
            this.layoutControlItem3.Name = "layoutControlItem3";
            this.layoutControlItem3.Size = new System.Drawing.Size(120, 34);
            this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            this.layoutControlItem3.Text = "layoutControlItem3";
            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem3.TextToControlDistance = 0;
            this.layoutControlItem3.TextVisible = false;
            // 
            // layoutControlItem9
            // 
            this.layoutControlItem9.Control = this.simpleButton4;
            this.layoutControlItem9.CustomizationFormText = "查看用户权限";
            this.layoutControlItem9.FillControlToClientArea = false;
            this.layoutControlItem9.Location = new System.Drawing.Point(409, 25);
            this.layoutControlItem9.MaxSize = new System.Drawing.Size(120, 26);
            this.layoutControlItem9.MinSize = new System.Drawing.Size(87, 26);
            this.layoutControlItem9.Name = "layoutControlItem9";
            this.layoutControlItem9.Size = new System.Drawing.Size(120, 34);
            this.layoutControlItem9.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            this.layoutControlItem9.Text = "查看用户权限";
            this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem9.TextToControlDistance = 0;
            this.layoutControlItem9.TextVisible = false;
            // 
            // layoutControlItem10
            // 
            this.layoutControlItem10.Control = this.simpleButton5;
            this.layoutControlItem10.CustomizationFormText = "layoutControlItem10";
            this.layoutControlItem10.FillControlToClientArea = false;
            this.layoutControlItem10.Location = new System.Drawing.Point(270, 25);
            this.layoutControlItem10.MaxSize = new System.Drawing.Size(0, 26);
            this.layoutControlItem10.MinSize = new System.Drawing.Size(63, 26);
            this.layoutControlItem10.Name = "layoutControlItem10";
            this.layoutControlItem10.Size = new System.Drawing.Size(139, 34);
            this.layoutControlItem10.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            this.layoutControlItem10.Text = "layoutControlItem10";
            this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem10.TextToControlDistance = 0;
            this.layoutControlItem10.TextVisible = false;
            // 
            // xtraTabControl1
            // 
            this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.xtraTabControl1.Location = new System.Drawing.Point(0, 83);
            this.xtraTabControl1.Name = "xtraTabControl1";
            this.xtraTabControl1.SelectedTabPage = this.UserRole;
            this.xtraTabControl1.Size = new System.Drawing.Size(673, 374);
            this.xtraTabControl1.TabIndex = 2;
            this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
            this.UserRole,
            this.UserRight});
            // 
            // UserRole
            // 
            this.UserRole.Controls.Add(this.panelControl2);
            this.UserRole.Name = "UserRole";
            this.UserRole.Size = new System.Drawing.Size(667, 347);
            this.UserRole.Text = "用户角色";
            // 
            // panelControl2
            // 
            this.panelControl2.Controls.Add(this.layoutControl2);
            this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panelControl2.Location = new System.Drawing.Point(0, 0);
            this.panelControl2.Name = "panelControl2";
            this.panelControl2.Size = new System.Drawing.Size(667, 347);
            this.panelControl2.TabIndex = 0;
            // 
            // layoutControl2
            // 
            this.layoutControl2.Controls.Add(this.labelControl2);
            this.layoutControl2.Controls.Add(this.simpleButton2);
            this.layoutControl2.Controls.Add(this.simpleButton1);
            this.layoutControl2.Controls.Add(this.labelControl1);
            this.layoutControl2.Controls.Add(this.m_listBoxUserRoles);
            this.layoutControl2.Controls.Add(this.m_listBoxRoles);
            this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.layoutControl2.Location = new System.Drawing.Point(2, 2);
            this.layoutControl2.Name = "layoutControl2";
            this.layoutControl2.Root = this.layoutControlGroup2;
            this.layoutControl2.Size = new System.Drawing.Size(663, 343);
            this.layoutControl2.TabIndex = 0;
            this.layoutControl2.Text = "layoutControl2";
            // 
            // labelControl2
            // 
            this.labelControl2.Location = new System.Drawing.Point(603, 12);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new System.Drawing.Size(48, 14);
            this.labelControl2.StyleController = this.layoutControl2;
            this.labelControl2.TabIndex = 9;
            this.labelControl2.Text = "用户角色";
            // 
            // simpleButton2
            // 
            this.simpleButton2.Location = new System.Drawing.Point(292, 56);
            this.simpleButton2.Name = "simpleButton2";
            this.simpleButton2.Size = new System.Drawing.Size(89, 22);
            this.simpleButton2.StyleController = this.layoutControl2;
            this.simpleButton2.TabIndex = 6;
            this.simpleButton2.Text = "<";
            this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click);
            // 
            // simpleButton1
            // 
            this.simpleButton1.Location = new System.Drawing.Point(292, 30);
            this.simpleButton1.Name = "simpleButton1";
            this.simpleButton1.Size = new System.Drawing.Size(89, 22);
            this.simpleButton1.StyleController = this.layoutControl2;
            this.simpleButton1.TabIndex = 5;
            this.simpleButton1.Text = ">";
            this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
            // 
            // labelControl1
            // 
            this.labelControl1.Location = new System.Drawing.Point(12, 12);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new System.Drawing.Size(48, 14);
            this.labelControl1.StyleController = this.layoutControl2;
            this.labelControl1.TabIndex = 8;
            this.labelControl1.Text = "角色列表";
            // 
            // m_listBoxUserRoles
            // 
            this.m_listBoxUserRoles.Location = new System.Drawing.Point(385, 30);
            this.m_listBoxUserRoles.Name = "m_listBoxUserRoles";
            this.m_listBoxUserRoles.Size = new System.Drawing.Size(266, 301);
            this.m_listBoxUserRoles.StyleController = this.layoutControl2;
            this.m_listBoxUserRoles.TabIndex = 7;
            this.m_listBoxUserRoles.SelectedIndexChanged += new System.EventHandler(this.m_listBoxUserRoles_SelectedIndexChanged);
            // 
            // m_listBoxRoles
            // 
            this.m_listBoxRoles.Location = new System.Drawing.Point(12, 30);
            this.m_listBoxRoles.Name = "m_listBoxRoles";
            this.m_listBoxRoles.Size = new System.Drawing.Size(276, 301);
            this.m_listBoxRoles.StyleController = this.layoutControl2;
            this.m_listBoxRoles.TabIndex = 4;
            // 
            // layoutControlGroup2
            // 
            this.layoutControlGroup2.CustomizationFormText = "layoutControlGroup2";
            this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            this.layoutControlGroup2.GroupBordersVisible = false;
            this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
            this.layoutControlItem5,
            this.layoutControlItem6,
            this.layoutControlItem7,
            this.layoutControlItem8,
            this.layoutControlItem12,
            this.layoutControlItem11});
            this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0);
            this.layoutControlGroup2.Name = "layoutControlGroup2";
            this.layoutControlGroup2.Size = new System.Drawing.Size(663, 343);
            this.layoutControlGroup2.Text = "layoutControlGroup2";
            this.layoutControlGroup2.TextVisible = false;
            // 
            // layoutControlItem5
            // 
            this.layoutControlItem5.Control = this.m_listBoxRoles;
            this.layoutControlItem5.CustomizationFormText = "layoutControlItem5";
            this.layoutControlItem5.Location = new System.Drawing.Point(0, 18);
            this.layoutControlItem5.Name = "layoutControlItem5";
            this.layoutControlItem5.Size = new System.Drawing.Size(280, 305);
            this.layoutControlItem5.Text = "layoutControlItem5";
            this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem5.TextToControlDistance = 0;
            this.layoutControlItem5.TextVisible = false;
            // 
            // layoutControlItem6
            // 
            this.layoutControlItem6.Control = this.simpleButton1;
            this.layoutControlItem6.CustomizationFormText = "layoutControlItem6";
            this.layoutControlItem6.Location = new System.Drawing.Point(280, 18);
            this.layoutControlItem6.Name = "layoutControlItem6";
            this.layoutControlItem6.Size = new System.Drawing.Size(93, 26);
            this.layoutControlItem6.Text = "layoutControlItem6";
            this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem6.TextToControlDistance = 0;
            this.layoutControlItem6.TextVisible = false;
            // 
            // layoutControlItem7
            // 
            this.layoutControlItem7.Control = this.simpleButton2;
            this.layoutControlItem7.CustomizationFormText = "layoutControlItem7";
            this.layoutControlItem7.Location = new System.Drawing.Point(280, 44);
            this.layoutControlItem7.Name = "layoutControlItem7";
            this.layoutControlItem7.Size = new System.Drawing.Size(93, 279);
            this.layoutControlItem7.Text = "layoutControlItem7";
            this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem7.TextToControlDistance = 0;
            this.layoutControlItem7.TextVisible = false;
            // 
            // layoutControlItem8
            // 
            this.layoutControlItem8.Control = this.m_listBoxUserRoles;
            this.layoutControlItem8.CustomizationFormText = "layoutControlItem8";
            this.layoutControlItem8.Location = new System.Drawing.Point(373, 18);
            this.layoutControlItem8.Name = "layoutControlItem8";
            this.layoutControlItem8.Size = new System.Drawing.Size(270, 305);
            this.layoutControlItem8.Text = "layoutControlItem8";
            this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem8.TextToControlDistance = 0;
            this.layoutControlItem8.TextVisible = false;
            // 
            // layoutControlItem12
            // 
            this.layoutControlItem12.Control = this.labelControl2;
            this.layoutControlItem12.ControlAlignment = System.Drawing.ContentAlignment.MiddleRight;
            this.layoutControlItem12.CustomizationFormText = "layoutControlItem12";
            this.layoutControlItem12.Location = new System.Drawing.Point(52, 0);
            this.layoutControlItem12.Name = "layoutControlItem12";
            this.layoutControlItem12.Size = new System.Drawing.Size(591, 18);
            this.layoutControlItem12.Text = "layoutControlItem12";
            this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem12.TextToControlDistance = 0;
            this.layoutControlItem12.TextVisible = false;
            // 
            // layoutControlItem11
            // 
            this.layoutControlItem11.Control = this.labelControl1;
            this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.MiddleCenter;
            this.layoutControlItem11.CustomizationFormText = "layoutControlItem11";
            this.layoutControlItem11.Location = new System.Drawing.Point(0, 0);
            this.layoutControlItem11.Name = "layoutControlItem11";
            this.layoutControlItem11.Size = new System.Drawing.Size(52, 18);
            this.layoutControlItem11.Text = "layoutControlItem11";
            this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem11.TextToControlDistance = 0;
            this.layoutControlItem11.TextVisible = false;
            // 
            // UserRight
            // 
            this.UserRight.Controls.Add(this.panelControl3);
            this.UserRight.Name = "UserRight";
            this.UserRight.Size = new System.Drawing.Size(667, 347);
            this.UserRight.Text = "用户权限";
            // 
            // panelControl3
            // 
            this.panelControl3.Controls.Add(this.layoutControl3);
            this.panelControl3.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panelControl3.Location = new System.Drawing.Point(0, 0);
            this.panelControl3.Name = "panelControl3";
            this.panelControl3.Size = new System.Drawing.Size(667, 347);
            this.panelControl3.TabIndex = 1;
            // 
            // layoutControl3
            // 
            this.layoutControl3.Controls.Add(this.labelControl3);
            this.layoutControl3.Controls.Add(this.m_listBoxUserRights);
            this.layoutControl3.Controls.Add(this.m_listBoxRights);
            this.layoutControl3.Controls.Add(this.simpleButton6);
            this.layoutControl3.Controls.Add(this.checkEdit1);
            this.layoutControl3.Controls.Add(this.simpleButton7);
            this.layoutControl3.Controls.Add(this.labelrights);
            this.layoutControl3.Dock = System.Windows.Forms.DockStyle.Fill;
            this.layoutControl3.Location = new System.Drawing.Point(2, 2);
            this.layoutControl3.Name = "layoutControl3";
            this.layoutControl3.Root = this.layoutControlGroup3;
            this.layoutControl3.Size = new System.Drawing.Size(663, 343);
            this.layoutControl3.TabIndex = 0;
            this.layoutControl3.Text = "layoutControl3";
            // 
            // labelControl3
            // 
            this.labelControl3.Location = new System.Drawing.Point(603, 12);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new System.Drawing.Size(48, 14);
            this.labelControl3.StyleController = this.layoutControl3;
            this.labelControl3.TabIndex = 9;
            this.labelControl3.Text = "用户权限";
            // 
            // m_listBoxUserRights
            // 
            this.m_listBoxUserRights.Location = new System.Drawing.Point(385, 30);
            this.m_listBoxUserRights.Name = "m_listBoxUserRights";
            this.m_listBoxUserRights.Size = new System.Drawing.Size(266, 301);
            this.m_listBoxUserRights.StyleController = this.layoutControl3;
            this.m_listBoxUserRights.TabIndex = 7;
            this.m_listBoxUserRights.SelectedIndexChanged += new System.EventHandler(this.m_listBoxUserRights_SelectedIndexChanged);
            // 
            // m_listBoxRights
            // 
            this.m_listBoxRights.Location = new System.Drawing.Point(12, 30);
            this.m_listBoxRights.Name = "m_listBoxRights";
            this.m_listBoxRights.Size = new System.Drawing.Size(276, 301);
            this.m_listBoxRights.StyleController = this.layoutControl3;
            this.m_listBoxRights.TabIndex = 4;
            // 
            // simpleButton6
            // 
            this.simpleButton6.Location = new System.Drawing.Point(292, 56);
            this.simpleButton6.Name = "simpleButton6";
            this.simpleButton6.Size = new System.Drawing.Size(89, 22);
            this.simpleButton6.StyleController = this.layoutControl3;
            this.simpleButton6.TabIndex = 6;
            this.simpleButton6.Text = "<";
            this.simpleButton6.Click += new System.EventHandler(this.simpleButton6_Click);
            // 
            // checkEdit1
            // 
            this.checkEdit1.Location = new System.Drawing.Point(292, 82);
            this.checkEdit1.Name = "checkEdit1";
            this.checkEdit1.Properties.Caption = "启用";
            this.checkEdit1.Size = new System.Drawing.Size(89, 19);
            this.checkEdit1.StyleController = this.layoutControl3;
            this.checkEdit1.TabIndex = 10;
            this.checkEdit1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.checkEdit1_Click);
            // 
            // simpleButton7
            // 
            this.simpleButton7.Location = new System.Drawing.Point(292, 30);
            this.simpleButton7.Name = "simpleButton7";
            this.simpleButton7.Size = new System.Drawing.Size(89, 22);
            this.simpleButton7.StyleController = this.layoutControl3;
            this.simpleButton7.TabIndex = 5;
            this.simpleButton7.Text = ">";
            this.simpleButton7.Click += new System.EventHandler(this.simpleButton7_Click);
            // 
            // labelrights
            // 
            this.labelrights.Location = new System.Drawing.Point(12, 12);
            this.labelrights.Name = "labelrights";
            this.labelrights.Size = new System.Drawing.Size(48, 14);
            this.labelrights.StyleController = this.layoutControl3;
            this.labelrights.TabIndex = 8;
            this.labelrights.Text = "权限列表";
            // 
            // layoutControlGroup3
            // 
            this.layoutControlGroup3.CustomizationFormText = "layoutControlGroup2";
            this.layoutControlGroup3.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            this.layoutControlGroup3.GroupBordersVisible = false;
            this.layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
            this.layoutControlItem13,
            this.layoutControlItem14,
            this.layoutControlItem15,
            this.layoutControlItem16,
            this.layoutControlItem17,
            this.layoutControlItem18,
            this.layoutControlItem19});
            this.layoutControlGroup3.Location = new System.Drawing.Point(0, 0);
            this.layoutControlGroup3.Name = "layoutControlGroup2";
            this.layoutControlGroup3.Size = new System.Drawing.Size(663, 343);
            this.layoutControlGroup3.Text = "layoutControlGroup2";
            this.layoutControlGroup3.TextVisible = false;
            // 
            // layoutControlItem13
            // 
            this.layoutControlItem13.Control = this.m_listBoxRights;
            this.layoutControlItem13.CustomizationFormText = "layoutControlItem5";
            this.layoutControlItem13.Location = new System.Drawing.Point(0, 18);
            this.layoutControlItem13.Name = "layoutControlItem5";
            this.layoutControlItem13.Size = new System.Drawing.Size(280, 305);
            this.layoutControlItem13.Text = "layoutControlItem5";
            this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem13.TextToControlDistance = 0;
            this.layoutControlItem13.TextVisible = false;
            // 
            // layoutControlItem14
            // 
            this.layoutControlItem14.Control = this.simpleButton7;
            this.layoutControlItem14.CustomizationFormText = "layoutControlItem6";
            this.layoutControlItem14.Location = new System.Drawing.Point(280, 18);
            this.layoutControlItem14.Name = "layoutControlItem6";
            this.layoutControlItem14.Size = new System.Drawing.Size(93, 26);
            this.layoutControlItem14.Text = "layoutControlItem6";
            this.layoutControlItem14.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem14.TextToControlDistance = 0;
            this.layoutControlItem14.TextVisible = false;
            // 
            // layoutControlItem15
            // 
            this.layoutControlItem15.Control = this.simpleButton6;
            this.layoutControlItem15.CustomizationFormText = "layoutControlItem7";
            this.layoutControlItem15.Location = new System.Drawing.Point(280, 44);
            this.layoutControlItem15.Name = "layoutControlItem7";
            this.layoutControlItem15.Size = new System.Drawing.Size(93, 26);
            this.layoutControlItem15.Text = "layoutControlItem7";
            this.layoutControlItem15.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem15.TextToControlDistance = 0;
            this.layoutControlItem15.TextVisible = false;
            // 
            // layoutControlItem16
            // 
            this.layoutControlItem16.Control = this.m_listBoxUserRights;
            this.layoutControlItem16.CustomizationFormText = "layoutControlItem8";
            this.layoutControlItem16.Location = new System.Drawing.Point(373, 18);
            this.layoutControlItem16.Name = "layoutControlItem8";
            this.layoutControlItem16.Size = new System.Drawing.Size(270, 305);
            this.layoutControlItem16.Text = "layoutControlItem8";
            this.layoutControlItem16.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem16.TextToControlDistance = 0;
            this.layoutControlItem16.TextVisible = false;
            // 
            // layoutControlItem17
            // 
            this.layoutControlItem17.Control = this.labelControl3;
            this.layoutControlItem17.ControlAlignment = System.Drawing.ContentAlignment.MiddleRight;
            this.layoutControlItem17.CustomizationFormText = "layoutControlItem12";
            this.layoutControlItem17.Location = new System.Drawing.Point(52, 0);
            this.layoutControlItem17.Name = "layoutControlItem12";
            this.layoutControlItem17.Size = new System.Drawing.Size(591, 18);
            this.layoutControlItem17.Text = "layoutControlItem12";
            this.layoutControlItem17.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem17.TextToControlDistance = 0;
            this.layoutControlItem17.TextVisible = false;
            // 
            // layoutControlItem18
            // 
            this.layoutControlItem18.Control = this.labelrights;
            this.layoutControlItem18.ControlAlignment = System.Drawing.ContentAlignment.MiddleCenter;
            this.layoutControlItem18.CustomizationFormText = "layoutControlItem11";
            this.layoutControlItem18.Location = new System.Drawing.Point(0, 0);
            this.layoutControlItem18.Name = "layoutControlItem11";
            this.layoutControlItem18.Size = new System.Drawing.Size(52, 18);
            this.layoutControlItem18.Text = "layoutControlItem11";
            this.layoutControlItem18.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem18.TextToControlDistance = 0;
            this.layoutControlItem18.TextVisible = false;
            // 
            // layoutControlItem19
            // 
            this.layoutControlItem19.Control = this.checkEdit1;
            this.layoutControlItem19.CustomizationFormText = "layoutControlItem19";
            this.layoutControlItem19.Location = new System.Drawing.Point(280, 70);
            this.layoutControlItem19.Name = "layoutControlItem19";
            this.layoutControlItem19.Size = new System.Drawing.Size(93, 253);
            this.layoutControlItem19.Text = "layoutControlItem19";
            this.layoutControlItem19.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
            this.layoutControlItem19.TextLocation = DevExpress.Utils.Locations.Right;
            this.layoutControlItem19.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem19.TextToControlDistance = 0;
            this.layoutControlItem19.TextVisible = false;
            // 
            // layoutControl4
            // 
            this.layoutControl4.Controls.Add(this.labelControl4);
            this.layoutControl4.Controls.Add(this.listBoxControl1);
            this.layoutControl4.Controls.Add(this.listBoxControl3);
            this.layoutControl4.Controls.Add(this.simpleButton8);
            this.layoutControl4.Controls.Add(this.simpleButton9);
            this.layoutControl4.Controls.Add(this.labelControl5);
            this.layoutControl4.Dock = System.Windows.Forms.DockStyle.Fill;
            this.layoutControl4.Location = new System.Drawing.Point(2, 2);
            this.layoutControl4.Name = "layoutControl4";
            this.layoutControl4.Root = this.layoutControlGroup4;
            this.layoutControl4.Size = new System.Drawing.Size(196, 96);
            this.layoutControl4.TabIndex = 0;
            this.layoutControl4.Text = "layoutControl2";
            // 
            // labelControl4
            // 
            this.labelControl4.Location = new System.Drawing.Point(136, 12);
            this.labelControl4.Name = "labelControl4";
            this.labelControl4.Size = new System.Drawing.Size(48, 14);
            this.labelControl4.StyleController = this.layoutControl4;
            this.labelControl4.TabIndex = 9;
            this.labelControl4.Text = "用户角色";
            // 
            // listBoxControl1
            // 
            this.listBoxControl1.Location = new System.Drawing.Point(114, 30);
            this.listBoxControl1.Name = "listBoxControl1";
            this.listBoxControl1.Size = new System.Drawing.Size(70, 54);
            this.listBoxControl1.StyleController = this.layoutControl4;
            this.listBoxControl1.TabIndex = 7;
            // 
            // listBoxControl3
            // 
            this.listBoxControl3.Location = new System.Drawing.Point(12, 30);
            this.listBoxControl3.Name = "listBoxControl3";
            this.listBoxControl3.Size = new System.Drawing.Size(73, 54);
            this.listBoxControl3.StyleController = this.layoutControl4;
            this.listBoxControl3.TabIndex = 4;
            // 
            // simpleButton8
            // 
            this.simpleButton8.Location = new System.Drawing.Point(89, 56);
            this.simpleButton8.Name = "simpleButton8";
            this.simpleButton8.Size = new System.Drawing.Size(21, 22);
            this.simpleButton8.StyleController = this.layoutControl4;
            this.simpleButton8.TabIndex = 6;
            this.simpleButton8.Text = "<";
            // 
            // simpleButton9
            // 
            this.simpleButton9.Location = new System.Drawing.Point(89, 30);
            this.simpleButton9.Name = "simpleButton9";
            this.simpleButton9.Size = new System.Drawing.Size(21, 22);
            this.simpleButton9.StyleController = this.layoutControl4;
            this.simpleButton9.TabIndex = 5;
            this.simpleButton9.Text = ">";
            // 
            // labelControl5
            // 
            this.labelControl5.Location = new System.Drawing.Point(12, 12);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new System.Drawing.Size(48, 14);
            this.labelControl5.StyleController = this.layoutControl4;
            this.labelControl5.TabIndex = 8;
            this.labelControl5.Text = "角色列表";
            // 
            // layoutControlGroup4
            // 
            this.layoutControlGroup4.CustomizationFormText = "layoutControlGroup2";
            this.layoutControlGroup4.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            this.layoutControlGroup4.GroupBordersVisible = false;
            this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
            this.layoutControlItem20,
            this.layoutControlItem21,
            this.layoutControlItem22,
            this.layoutControlItem23,
            this.layoutControlItem24,
            this.layoutControlItem25});
            this.layoutControlGroup4.Location = new System.Drawing.Point(0, 0);
            this.layoutControlGroup4.Name = "layoutControlGroup2";
            this.layoutControlGroup4.Size = new System.Drawing.Size(196, 96);
            this.layoutControlGroup4.Text = "layoutControlGroup2";
            this.layoutControlGroup4.TextVisible = false;
            // 
            // layoutControlItem20
            // 
            this.layoutControlItem20.Control = this.listBoxControl3;
            this.layoutControlItem20.CustomizationFormText = "layoutControlItem5";
            this.layoutControlItem20.Location = new System.Drawing.Point(0, 18);
            this.layoutControlItem20.Name = "layoutControlItem5";
            this.layoutControlItem20.Size = new System.Drawing.Size(77, 58);
            this.layoutControlItem20.Text = "layoutControlItem5";
            this.layoutControlItem20.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem20.TextToControlDistance = 0;
            this.layoutControlItem20.TextVisible = false;
            // 
            // layoutControlItem21
            // 
            this.layoutControlItem21.Control = this.simpleButton9;
            this.layoutControlItem21.CustomizationFormText = "layoutControlItem6";
            this.layoutControlItem21.Location = new System.Drawing.Point(77, 18);
            this.layoutControlItem21.Name = "layoutControlItem6";
            this.layoutControlItem21.Size = new System.Drawing.Size(25, 26);
            this.layoutControlItem21.Text = "layoutControlItem6";
            this.layoutControlItem21.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem21.TextToControlDistance = 0;
            this.layoutControlItem21.TextVisible = false;
            // 
            // layoutControlItem22
            // 
            this.layoutControlItem22.Control = this.simpleButton8;
            this.layoutControlItem22.CustomizationFormText = "layoutControlItem7";
            this.layoutControlItem22.Location = new System.Drawing.Point(77, 44);
            this.layoutControlItem22.Name = "layoutControlItem7";
            this.layoutControlItem22.Size = new System.Drawing.Size(25, 32);
            this.layoutControlItem22.Text = "layoutControlItem7";
            this.layoutControlItem22.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem22.TextToControlDistance = 0;
            this.layoutControlItem22.TextVisible = false;
            // 
            // layoutControlItem23
            // 
            this.layoutControlItem23.Control = this.listBoxControl1;
            this.layoutControlItem23.CustomizationFormText = "layoutControlItem8";
            this.layoutControlItem23.Location = new System.Drawing.Point(102, 18);
            this.layoutControlItem23.Name = "layoutControlItem8";
            this.layoutControlItem23.Size = new System.Drawing.Size(74, 58);
            this.layoutControlItem23.Text = "layoutControlItem8";
            this.layoutControlItem23.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem23.TextToControlDistance = 0;
            this.layoutControlItem23.TextVisible = false;
            // 
            // layoutControlItem24
            // 
            this.layoutControlItem24.Control = this.labelControl4;
            this.layoutControlItem24.ControlAlignment = System.Drawing.ContentAlignment.MiddleRight;
            this.layoutControlItem24.CustomizationFormText = "layoutControlItem12";
            this.layoutControlItem24.Location = new System.Drawing.Point(52, 0);
            this.layoutControlItem24.Name = "layoutControlItem12";
            this.layoutControlItem24.Size = new System.Drawing.Size(124, 18);
            this.layoutControlItem24.Text = "layoutControlItem12";
            this.layoutControlItem24.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem24.TextToControlDistance = 0;
            this.layoutControlItem24.TextVisible = false;
            // 
            // layoutControlItem25
            // 
            this.layoutControlItem25.Control = this.labelControl5;
            this.layoutControlItem25.ControlAlignment = System.Drawing.ContentAlignment.MiddleCenter;
            this.layoutControlItem25.CustomizationFormText = "layoutControlItem11";
            this.layoutControlItem25.Location = new System.Drawing.Point(0, 0);
            this.layoutControlItem25.Name = "layoutControlItem11";
            this.layoutControlItem25.Size = new System.Drawing.Size(52, 18);
            this.layoutControlItem25.Text = "layoutControlItem11";
            this.layoutControlItem25.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem25.TextToControlDistance = 0;
            this.layoutControlItem25.TextVisible = false;
            // 
            // panelControl4
            // 
            this.panelControl4.Controls.Add(this.layoutControl4);
            this.panelControl4.Location = new System.Drawing.Point(0, 0);
            this.panelControl4.Name = "panelControl4";
            this.panelControl4.Size = new System.Drawing.Size(200, 100);
            this.panelControl4.TabIndex = 0;
            // 
            // UserInfo
            // 
            this.AcceptButton = this.sbOk;
            this.ClientSize = new System.Drawing.Size(673, 457);
            this.Controls.Add(this.xtraTabControl1);
            this.Controls.Add(this.panelControl1);
            this.Name = "UserInfo";
            this.Text = "用户信息";
            this.Load += new System.EventHandler(this.UserInfo_Load);
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
            this.panelControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
            this.layoutControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.tbCreateDate.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbUserName.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbLastLoginTime.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
            this.xtraTabControl1.ResumeLayout(false);
            this.UserRole.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
            this.panelControl2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit();
            this.layoutControl2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.m_listBoxUserRoles)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.m_listBoxRoles)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
            this.UserRight.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.panelControl3)).EndInit();
            this.panelControl3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).EndInit();
            this.layoutControl3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.m_listBoxUserRights)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.m_listBoxRights)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.checkEdit1.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).EndInit();
            this.layoutControl4.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.listBoxControl1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.listBoxControl3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem23)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem24)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem25)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl4)).EndInit();
            this.panelControl4.ResumeLayout(false);
            this.ResumeLayout(false);

        }
        #endregion 
        public UserInfo(User u)
        {
            InitializeComponent();
            this.CenterToScreen();
            this.User = u;
            this.tbUserName.Text = u.name;
            this.tbCreateDate.Text= u.createdate;
            this.tbLastLoginTime.Text = u.logindate;
            this.Text = "用户 " + u.name + " 的信息";
            this.sbOk.DialogResult = System.Windows.Forms.DialogResult.OK;
        }
        #endregion

        private User User { get; set; }

        #region 按钮事件
        /// <summary>
        /// 查看用户权限按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton4_Click(object sender, EventArgs e)
        {

            try
            {

                // Get the current user index.
                

                // Should we ignore the the event?
                if (User == null)
                    return;

                // Get the identifiers.
                int userID = User.id;

                // Get the list of effective rights.
                string[] rights = SecurityManager.EffectiveRights(userID);

                // Show the results.
                EffectiveRightsForm form = new EffectiveRightsForm();
                form.EffectiveRights = rights;

                form.ShowDialog(this);

            } // End try

            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            } // End catch
        }
        /// <summary>
        /// 更改密码按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton5_Click(object sender, EventArgs e)
        {
            
            try
            { 
                // Should we ignore the the event?
                if (User ==null)
                    return;

                // Get the identifiers.
                int userID = User.id;

                // Prompt the user.
                ChangePassWord form = new ChangePassWord();

                if (form.ShowDialog(this) != System.Windows.Forms.DialogResult.OK)
                    return;

                // Update the password.
                if (UserManager.UpdatePassword(
                     userID,
                     form.OldPassWord,
                     form.NewPassWord
                     ) > 0)
                {
                    XtraMessageBox.Show("密码更改成功", "提示");
                }
                else { XtraMessageBox.Show("密码更改成功", "提示"); }

            } // End try

            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            } // End catch
            			
        }
        /// <summary>
        /// 确定按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton3_Click(object sender, EventArgs e)
        {

        }
        #endregion
        /// <summary>
        /// 在第一次打开时调用，对应以前的用户列表框选项变化事件。在Load事件中调用了。
        /// </summary>
        void init()
        {

            try
            {

                // Get the current user index.
            

                // Should we ignore the the event?
                if (User == null)
                    return;

                // Get the identifier for the user.
                int userID = User.id;

                // Update the properties tab page.


                // Get the roles for the user.
                m_userRoleTable = UserRoleManager.FindByUser(userID).Tables[0];

                // Bind the GUI to the table.
                m_listBoxUserRoles.DataSource = m_userRoleTable;
                m_listBoxUserRoles.DisplayMember = "role_name";

                // Get the rights for the user.
                m_userRightTable = UserRightManager.FindByUser(userID).Tables[0];

                // Bind the GUI to the table.
                m_listBoxUserRights.DataSource = m_userRightTable;
                m_listBoxUserRights.DisplayMember = "right_name";
                 

            } // End try

            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            } // End catch
        }
        DataTable m_userTable, m_roleTable, m_rightTable, m_userRoleTable, m_userRightTable;
        private void UserInfo_Load(object sender, EventArgs e)
        {
            // Get the list of all users.
            m_userTable = UserManager.FindAll().Tables[0];

            // Get the list of all roles.
            m_roleTable = RoleManager.FindAll().Tables[0];

            // Get the list of all rights.
            m_rightTable = RightManager.FindAll().Tables[0];

            // Bind the GUI to the tables.
            m_listBoxRoles.DataSource = m_userTable;
            m_listBoxRoles.DisplayMember = "user_name";
            m_listBoxRoles.DataSource = m_roleTable;
            m_listBoxRoles.DisplayMember = "role_name";
            m_listBoxRights.DataSource = m_rightTable;
            m_listBoxRights.DisplayMember = "right_name";
            init();
        }
        /// <summary>
        /// 添加用户角色按钮   >
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {

                // Get the current role index .
                int roleIndex = m_listBoxRoles.SelectedIndex;

                // Should we ignore the the event?
                if (roleIndex == -1)
                    return;

                // Get the current user index.
                

                // Should we ignore the the event?
                if (User == null)
                    return;

                // Get the identifiers.
                int userID = User.id;
                int roleID = (Int32)m_roleTable.Rows[roleIndex]["role_id"];
              //  m_userRoleTable = UserRoleManager.FindByUser(userID).Tables[0];
                // Search for an existing row.
                DataRow[] rows = m_userRoleTable.Select(
                    "role_id = " + roleID + " AND user_id = " + userID
                    );

                // Is there already an association?
                if (rows.Length > 0)
                    return;

                // Create a new association.
                UserRoleManager.Create(userID, roleID);

                // Get the roles for the user.
                m_userRoleTable = UserRoleManager.FindByUser(userID).Tables[0];

                // Bind the GUI to the table.
                m_listBoxUserRoles.DataSource = m_userRoleTable;
                m_listBoxUserRoles.DisplayMember = "role_name";

              

            } // End try

            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            } // End catch

        }
        /// <summary>
        /// 删除用户角色按钮   <
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton2_Click(object sender, EventArgs e)
        {

            try
            {

                // Get the current user role index .
                int userRoleIndex = m_listBoxUserRoles.SelectedIndex;

                // Should we ignore the the event?
                if (userRoleIndex == -1)
                    return;

                // Get the current user index.
                

                // Should we ignore the the event?
                if (User == null)
                    return;

                // Get the identifiers.
                int userID = User.id;
                int roleID = (Int32)m_userRoleTable.Rows[userRoleIndex]["role_id"];

                // Delete the association.
                UserRoleManager.Delete(userID, roleID);

                // Get the roles for the user.
                m_userRoleTable = UserRoleManager.FindByUser(userID).Tables[0];

                // Bind the GUI to the table.
                m_listBoxUserRoles.DataSource = m_userRoleTable;
                m_listBoxUserRoles.DisplayMember = "role_name";

                

            } // End try

            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            } // End c
        }
        /// <summary>
        ///添加 用户权限， >
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton7_Click(object sender, EventArgs e)
        {


            try
            {

                // Get the current right index .
                int rightIndex = m_listBoxRights.SelectedIndex;

                // Should we ignore the the event?
                if (rightIndex == -1)
                    return;

                // Get the current user index.
                 

                // Should we ignore the the event?
                if (User ==null)
                    return;

                // Get the identifiers.
                int userID = User.id;
                int rightID = (Int32)m_rightTable.Rows[rightIndex]["right_id"];

                // Search for an existing row.
                DataRow[] rows = m_userRightTable.Select(
                    "right_id = " + rightID + " AND user_id = " + userID
                    );

                // Is there already an association?
                if (rows.Length > 0)
                    return;

                // Create a new association.
                UserRightManager.Create(userID, rightID, false);

                // Get the right for the user.
                m_userRightTable = UserRightManager.FindByUser(userID).Tables[0];

                // Bind the GUI to the table.
                m_listBoxUserRights.DataSource = m_userRightTable;
                m_listBoxUserRights.DisplayMember = "right_name";

                

            } // End try

            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            } // End catch
        }
        /// <summary>
        /// 删除用户权限
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton6_Click(object sender, EventArgs e)
        {

            try
            {

                // Get the current user right index .
                int userRightIndex = m_listBoxUserRights.SelectedIndex;

                // Should we ignore the the event?
                if (userRightIndex == -1)
                    return;

                // Get the current user index.
                

                // Should we ignore the the event?
                if (User == null)
                    return;

                // Get the identifiers.
                int userID = User.id;
                int rightID = (Int32)m_userRightTable.Rows[userRightIndex]["right_id"];

                // Delete the association.
                UserRightManager.Delete(userID, rightID);

                // Get the rights for the user.
                m_userRightTable = UserRightManager.FindByUser(userID).Tables[0];

                // Bind the GUI to the table.
                m_listBoxUserRights.DataSource = m_userRightTable;
                m_listBoxUserRights.DisplayMember = "right_name";

               

            } // End try

            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            } // End 
        }
        /// <summary>
        /// 启用权限   ，CheckBox事件处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void checkEdit1_Click(object sender, EventArgs e)
        {
         

        }
        /// <summary>
        /// 用户权限列表事件，更新启用权限CheckBox的状态
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void m_listBoxUserRoles_SelectedIndexChanged(object sender, EventArgs e)
        {

            // Get the current user right index.
            int userRightIndex = m_listBoxUserRights.SelectedIndex;

            // Should we ignore the the event?
            if (userRightIndex == -1)
                return;

            // Get the state of the enable flag.
            bool enableFlag = (bool)m_userRightTable.Rows[userRightIndex]["enable_flag"];

            // Update the GUI.
            this.checkEdit1.Checked = enableFlag;
		
        }
        /// <summary>
        /// 用户权限列表    在用户权限页中
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void m_listBoxUserRights_SelectedIndexChanged(object sender, EventArgs e)
        {

            // Get the current user right index.
            int userRightIndex = m_listBoxUserRights.SelectedIndex;

            // Should we ignore the the event?
            if (userRightIndex == -1)
            {
                this.checkEdit1.Enabled = false;
                return;
            }
            this.checkEdit1.Enabled = true;
            // Get the state of the enable flag.
            bool enableFlag = (bool)m_userRightTable.Rows[userRightIndex]["enable_flag"];

            // Update the GUI.
            this.checkEdit1.Checked = enableFlag;
        }

 

        private void checkEdit1_Click(object sender, System.Windows.Forms.MouseEventArgs e)
        {

            try
            {

                // Get the current user right index.
                int userRightIndex = m_listBoxUserRights.SelectedIndex;

                // Should we ignore the the event?
                if (userRightIndex == -1)
                    return;

                // Get the identifiers.
                int userID = (Int32)m_userRightTable.Rows[userRightIndex]["user_id"];
                int rightID = (Int32)m_userRightTable.Rows[userRightIndex]["right_id"];

                // Update the enable flag.
                UserRightManager.Update(
                    userID,
                    rightID,
                   ! this.checkEdit1 .Checked
                    );

                // Get the rights for the user.
                m_userRightTable = UserRightManager.FindByUser(userID).Tables[0];

                //// Bind the GUI to the table.
                //m_listBoxUserRights.DataSource = m_userRightTable;
                //m_listBoxUserRights.DisplayMember = "right_name";
                //m_listBoxUserRights.SelectedIndex = userRightIndex;

            } // End try

            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            } // End catch

        }


    }
}
